import 'package:flutter/material.dart';

class ButtonPage extends StatelessWidget {
  const ButtonPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        children: [
          ElevatedButton(
            onPressed: null,
            style: ButtonStyle(
              backgroundColor: WidgetStateProperty.all(Colors.amber),
              foregroundColor: WidgetStateProperty.all(Colors.green),
              elevation: WidgetStateProperty.all(10),
              shadowColor: WidgetStateProperty.all(Colors.red),
              shape: WidgetStateProperty.all(
                RoundedRectangleBorder(borderRadius: BorderRadius.circular(50)),
              ),
            ),
            child: Text('ElevatedButton'),
          ),
          // 文字按钮
          TextButton(onPressed: () {}, child: const Text('TextButton')),

          // 边框按钮
          OutlinedButton(onPressed: () {}, child: const Text('OutlinedButton')),

          // 图标按钮
          IconButton(
            onPressed: () {},
            icon: const Icon(Icons.holiday_village),
            iconSize: 50,
            color: Colors.amber,
          ),

          // 带图标 TextButton
          TextButton.icon(
            onPressed: () {},
            icon: const Icon(Icons.holiday_village),
            label: const Text('带图标 TextButton'),
          ),

          // 带图标 OutlinedButton
          OutlinedButton.icon(
            onPressed: () {},
            icon: const Icon(Icons.holiday_village),
            label: const Text('带图标 OutlinedButton'),
          ),
        ],
      ),
    );
  }
}
